<%

	CONST FILE_EXT = ".rbs"

	dim path
	dim oXml, oNodeTrk
	dim oFso, oFld, oFile
	
		path = server.mappath(".")
		
		set oFso = server.createObject("Scripting.FileSystemObject")
		set oFld = oFso.getFolder(path)
		
		
		set oXml = server.createobject("MSXML2.DOMDocument")
		oXML.async=false
		
		set oXML.documentElement = oXML.createElement("tracks") 
		
		for each oFile in oFld.files
		
			if right(oFile.name, 4) = FILE_EXT then
				
				set oNodeTrk = oXml.createElement("track")
				oXML.documentElement.appendChild oNodeTrk
				
				oNodeTrk.setAttribute "trackMod", dateDiff("s", cdate("1970-01-01"), oFile.DateLastModified)
				oNodeTrk.setAttribute "title", left(oFile.name, len(oFile.name)-4)
				oNodeTrk.setAttribute "path", oFld.name &"/"& oFile.name
				
				set oNodeTrk = nothing
				
			end if
			
		next		
		
		'response.contentType = "text/xml"
		
		response.write "<?xml version=""1.0"" encoding=""UTF-8""?>"
		response.write oXml.xml

		set oXml = nothing		
		set oFso = nothing
		
%>